﻿#include <iostream>
using namespace std;

void fill(int(*a)[3], int n, int v) {
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < 3; j++) {
			a[i][j] = v;
		}
	}
}

int main() {
	int x[2][3] = { 0 };

	fill(x, 2, 5);

	for (int i = 0; i < 2; i++) {
		for (int j = 0; j < 3; j++) {
			cout << "x[" << i << "][" << j << "]=" << x[i][j] << endl;
		}
	}

	cin.get();
}